<!DOCTYPE html>
<html lang="es">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>FizzBuzz</title>
    <style>
      .fizz {
        color: red;
        text-transform: uppercase;
      }
      .buzz {
        color: blue;
        text-transform: uppercase;
      }
      .fizzbuzz {
        color: green;
        text-transform: uppercase;
      }
    </style>
  </head>
  <body>
    <ul id="fizzbuzz"></ul>
    <script>
      const fizzbuzz = (n) => {
        for (let i = 1; i <= n; i++) {
          let li = document.createElement("li");
          if (i % 15 === 0) {
            li.className = "fizzbuzz";
            li.textContent = "fizzbuzz";
          } else if (i % 5 === 0) {
            li.className = "buzz";
            li.textContent = "buzz";
          } else if (i % 3 === 0) {
            li.className = "fizz";
            li.textContent = "fizz";
          } else {
            li.textContent = i;
          }
          document.getElementById("fizzbuzz").appendChild(li);
        }
      };
      fizzbuzz(100);
    </script>
  </body>
</html>
